import Consumables from "@/serive/Consumables";

export default {
    state: {
        warehousingaddList: [],
    },
    getters: {
        getwarehousingaddList(state) {
            return [...state.getwarehousingaddList]
        }
    },
    mutations: {
        setTest(state, data) {
            console.log(data);
            state.warehousingaddList = data
        }
    },
    actions: {//异步操作
        async warehousingadd({ commit }, { cspecification, cname, cnumber, cprice, creceiveNum, cspecification, cstorageSite }) {
            let result = await Consumables.warehousingAdd(cspecification, cname, cnumber, cprice, creceiveNum, cspecification, cstorageSite)
            commit("setTest", result.data)
            return result
        }
    },


}